//
// 嗨~ o(*￣▽￣*)ブ
// Created by Mokou on 2020/7/14.
//

#import "FileSelector.h"
#import "Database.h"

@interface GlobalData : NSObject

@property (nonatomic, retain) Database *db;
@property (nonatomic, retain) FileSelector *fileSelector;

+ (GlobalData *)shareInstance;

@end

extern int const int_nil;

extern NSString *const method_channel_name;

extern NSString *const MSG_appDelegate_request_location_auth;

/**
 * flutter方法名
 * */
extern NSString *const fcn_sysVer;
extern NSString *const fcn_appVer;
extern NSString *const fcn_imei;
extern NSString *const fcn_initBugly;
extern NSString *const fcn_wifi_enabled;
extern NSString *const fcn_wifi_current;
extern NSString *const fcn_show_sysOption;
extern NSString *const fcn_show_sysTel;
extern NSString *const fcn_toast;
extern NSString *const fcn_checkUpgrade;
extern NSString *const fcn_get_file_length;
extern NSString *const fcn_wifi_strength;
extern NSString *const fcn_ios_request_location_auth;

extern NSString *const fcn_localStorage_insert_string;
extern NSString *const fcn_localStorage_insert_int;
extern NSString *const fcn_localStorage_delete;
extern NSString *const fcn_localStorage_update;
extern NSString *const fcn_localStorage_select_string;
extern NSString *const fcn_localStorage_select_int;

extern NSString *const fcn_selectPhoto;
extern NSString *const fcn_selectVideo;

extern NSString *const fcn_schedule_create;
extern NSString *const fcn_schedule_delete;
extern NSString *const fcn_schedule_update;
extern NSString *const fcn_schedule_select;
extern NSString *const fcn_schedule_select_page;
extern NSString *const fcn_schedule_check_expired;
extern NSString *const fcn_schedule_clear;

extern NSString *const fcn_material_insert;
extern NSString *const fcn_material_delete;
extern NSString *const fcn_material_update;
extern NSString *const fcn_material_order;
extern NSString *const fcn_material_select;

extern NSString *const fcn_get_cache_file;
extern NSString *const fcn_delete_cache_file;

extern NSString *const fcn_device_store;
extern NSString *const fcn_device_delete;
extern NSString *const fcn_device_clear;
extern NSString *const fcn_device_query;

extern NSString *const fcn_upgrade_create;
extern NSString *const fcn_upgrade_clear;
extern NSString *const fcn_upgrade_delete;
extern NSString *const fcn_upgrade_download;
extern NSString *const fcn_upgrade_update;

extern NSString *const fcn_device_upgrade_query;

/**
 * 本地数据库名
 * */
extern NSString *const db_name_schedule;
extern NSString *const db_name_material;
extern NSString *const db_name_relation;
extern NSString *const db_name_tmpMedia;
extern NSString *const db_name_device;
extern NSString *const db_name_upgrade;


/**
 * 本地存储标识
 * */
extern NSString *const localStorage_key;


/**
 * 本地素材文件目录
 * */
extern NSString *const localFileDir;
extern NSString *const localUpgradeFileDir;
extern NSString *const localUpgradeFileFir_cache;


/**
 * 素材表素材类型
 * 修改时注意同时修改 [ElecMaterial init:]
 * */
typedef NS_ENUM(int, type_db_material) {
    type_db_material_text = 1,
    type_db_material_photo,
    type_db_material_video,
};


/**
 * 计划表方向
 * 修改时注意同时修改 [ElecSchedule init:]
 * */
typedef NS_ENUM(int, direction_db_schedule) {
    direction_db_schedule_horizontal = 1,
    direction_db_schedule_vertical,
};

/**
 * 设备计划状态 (是否过期)
 * */
typedef NS_ENUM(int, device_schedule_expired) {
    device_schedule_validity_notFound = -1,
    device_schedule_validity_valid = 1,
    device_schedule_validity_expired = 2,
    device_schedule_validity_noMaterial = 3,
    device_schedule_validity_noEffectMaterial = 4,
};
